3.1.31 \(\int \frac {(e x)^m (a+b x^n) (A+B x^n)}{(c+d x^n)^2} \, dx\) [31]

Optimal. Leaf size=178 \[ -\frac {B (a d (1+m)-b c (1+m+n)) (e x)^{1+m}}{c d^2 e (1+m) n}-\frac {(b c-a d) (e x)^{1+m} \left (A+B x^n\right )}{c d e n \left (c+d x^n\right )}+\frac {(A d (b c (1+m)-a d (1+m-n))+B c (a d (1+m)-b c (1+m+n))) (e x)^{1+m} \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )}{c^2 d^2 e (1+m) n} \]

[Out]

-B*(a*d*(1+m)-b*c*(1+m+n))*(e*x)^(1+m)/c/d^2/e/(1+m)/n-(-a*d+b*c)*(e*x)^(1+m)*(A+B*x^n)/c/d/e/n/(c+d*x^n)+(A*d
*(b*c*(1+m)-a*d*(1+m-n))+B*c*(a*d*(1+m)-b*c*(1+m+n)))*(e*x)^(1+m)*hypergeom([1, (1+m)/n],[(1+m+n)/n],-d*x^n/c)
/c^2/d^2/e/(1+m)/n

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {608, 470, 371} \begin {gather*} \frac {(e x)^{m+1} \, _2F_1\left (1,\frac {m+1}{n};\frac {m+n+1}{n};-\frac {d x^n}{c}\right ) (A d (b c (m+1)-a d (m-n+1))+B c (a d (m+1)-b c (m+n+1)))}{c^2 d^2 e (m+1) n}-\frac {(e x)^{m+1} (b c-a d) \left (A+B x^n\right )}{c d e n \left (c+d x^n\right )}-\frac {B (e x)^{m+1} (a d (m+1)-b c (m+n+1))}{c d^2 e (m+1) n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((e*x)^m*(a + b*x^n)*(A + B*x^n))/(c + d*x^n)^2,x]

[Out]

-((B*(a*d*(1 + m) - b*c*(1 + m + n))*(e*x)^(1 + m))/(c*d^2*e*(1 + m)*n)) - ((b*c - a*d)*(e*x)^(1 + m)*(A + B*x
^n))/(c*d*e*n*(c + d*x^n)) + ((A*d*(b*c*(1 + m) - a*d*(1 + m - n)) + B*c*(a*d*(1 + m) - b*c*(1 + m + n)))*(e*x
)^(1 + m)*Hypergeometric2F1[1, (1 + m)/n, (1 + m + n)/n, -((d*x^n)/c)])/(c^2*d^2*e*(1 + m)*n)

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(b*e*(m + n*(p + 1) + 1))), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

Rule 608

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[(-(b*e - a*f))*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^q/(a*b*g*n*(p + 1))), x] + Dis
t[1/(a*b*n*(p + 1)), Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q - 1)*Simp[c*(b*e*n*(p + 1) + (b*e - a*f)*(
m + 1)) + d*(b*e*n*(p + 1) + (b*e - a*f)*(m + n*q + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n},
x] && LtQ[p, -1] && GtQ[q, 0] &&  !(EqQ[q, 1] && SimplerQ[b*c - a*d, b*e - a*f])

Rubi steps

\begin {align*} \int \frac {(e x)^m \left (a+b x^n\right ) \left (A+B x^n\right )}{\left (c+d x^n\right )^2} \, dx &=-\frac {(b c-a d) (e x)^{1+m} \left (A+B x^n\right )}{c d e n \left (c+d x^n\right )}-\frac {\int \frac {(e x)^m \left (-A (b c (1+m)-a d (1+m-n))+B (a d (1+m)-b c (1+m+n)) x^n\right )}{c+d x^n} \, dx}{c d n}\\ &=-\frac {B (a d (1+m)-b c (1+m+n)) (e x)^{1+m}}{c d^2 e (1+m) n}-\frac {(b c-a d) (e x)^{1+m} \left (A+B x^n\right )}{c d e n \left (c+d x^n\right )}+\frac {(A d (b c (1+m)-a d (1+m-n))+B c (a d (1+m)-b c (1+m+n))) \int \frac {(e x)^m}{c+d x^n} \, dx}{c d^2 n}\\ &=-\frac {B (a d (1+m)-b c (1+m+n)) (e x)^{1+m}}{c d^2 e (1+m) n}-\frac {(b c-a d) (e x)^{1+m} \left (A+B x^n\right )}{c d e n \left (c+d x^n\right )}+\frac {(A d (b c (1+m)-a d (1+m-n))+B c (a d (1+m)-b c (1+m+n))) (e x)^{1+m} \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )}{c^2 d^2 e (1+m) n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.29, size = 193, normalized size = 1.08 \begin {gather*} \frac {x (e x)^m \left (b c (-B c+A d)+a d \left (B c+\frac {A d (-1-m+n)}{1+m}\right )+\frac {a d (-B c (1+m)+A d (1+m-n))+b c (-A d (1+m)+B c (1+m+n))}{1+m}+\frac {c (b c-a d) (B c-A d)}{c+d x^n}-\frac {(a d (-B c (1+m)+A d (1+m-n))+b c (-A d (1+m)+B c (1+m+n))) \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )}{1+m}\right )}{c^2 d^2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((e*x)^m*(a + b*x^n)*(A + B*x^n))/(c + d*x^n)^2,x]

[Out]

(x*(e*x)^m*(b*c*(-(B*c) + A*d) + a*d*(B*c + (A*d*(-1 - m + n))/(1 + m)) + (a*d*(-(B*c*(1 + m)) + A*d*(1 + m -
n)) + b*c*(-(A*d*(1 + m)) + B*c*(1 + m + n)))/(1 + m) + (c*(b*c - a*d)*(B*c - A*d))/(c + d*x^n) - ((a*d*(-(B*c
*(1 + m)) + A*d*(1 + m - n)) + b*c*(-(A*d*(1 + m)) + B*c*(1 + m + n)))*Hypergeometric2F1[1, (1 + m)/n, (1 + m
+ n)/n, -((d*x^n)/c)])/(1 + m)))/(c^2*d^2*n)

________________________________________________________________________________________

Maple [F]
time = 0.06, size = 0, normalized size = 0.00 \[\int \frac {\left (e x \right )^{m} \left (a +b \,x^{n}\right ) \left (A +B \,x^{n}\right )}{\left (c +d \,x^{n}\right )^{2}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n)^2,x)

[Out]

int((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n)^2,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n)^2,x, algorithm="maxima")

[Out]

(((m*e^m + e^m)*b*c*d - (m*e^m - (n - 1)*e^m)*a*d^2)*A - ((m*e^m + (n + 1)*e^m)*b*c^2 - (m*e^m + e^m)*a*c*d)*B
)*integrate(x^m/(c*d^3*n*x^n + c^2*d^2*n), x) + (B*b*c*d*n*x*e^(m*log(x) + n*log(x) + m) - (((m*e^m + e^m)*b*c
*d - (m*e^m + e^m)*a*d^2)*A - ((m*e^m + (n + 1)*e^m)*b*c^2 - (m*e^m + e^m)*a*c*d)*B)*x*x^m)/((m*n + n)*c*d^3*x
^n + (m*n + n)*c^2*d^2)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n)^2,x, algorithm="fricas")

[Out]

integral((B*b*x^(2*n) + A*a + (B*a + A*b)*x^n)*(x*e)^m/(d^2*x^(2*n) + 2*c*d*x^n + c^2), x)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 31.12, size = 4129, normalized size = 23.20 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**m*(a+b*x**n)*(A+B*x**n)/(c+d*x**n)**2,x)

[Out]

A*a*(-e**m*m**2*x*x**m*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/n + 1/n)/(c*(c*n**3*gamma(m/n
+ 1 + 1/n) + d*n**3*x**n*gamma(m/n + 1 + 1/n))) + e**m*m*n*x*x**m*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n +
1/n)*gamma(m/n + 1/n)/(c*(c*n**3*gamma(m/n + 1 + 1/n) + d*n**3*x**n*gamma(m/n + 1 + 1/n))) + e**m*m*n*x*x**m*g
amma(m/n + 1/n)/(c*(c*n**3*gamma(m/n + 1 + 1/n) + d*n**3*x**n*gamma(m/n + 1 + 1/n))) - 2*e**m*m*x*x**m*lerchph
i(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/n + 1/n)/(c*(c*n**3*gamma(m/n + 1 + 1/n) + d*n**3*x**n*gamma
(m/n + 1 + 1/n))) + e**m*n*x*x**m*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/n + 1/n)/(c*(c*n**3
*gamma(m/n + 1 + 1/n) + d*n**3*x**n*gamma(m/n + 1 + 1/n))) + e**m*n*x*x**m*gamma(m/n + 1/n)/(c*(c*n**3*gamma(m
/n + 1 + 1/n) + d*n**3*x**n*gamma(m/n + 1 + 1/n))) - e**m*x*x**m*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1
/n)*gamma(m/n + 1/n)/(c*(c*n**3*gamma(m/n + 1 + 1/n) + d*n**3*x**n*gamma(m/n + 1 + 1/n))) - d*e**m*m**2*x*x**m
*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/n + 1/n)/(c**2*(c*n**3*gamma(m/n + 1 + 1/n) + d
*n**3*x**n*gamma(m/n + 1 + 1/n))) + d*e**m*m*n*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*ga
mma(m/n + 1/n)/(c**2*(c*n**3*gamma(m/n + 1 + 1/n) + d*n**3*x**n*gamma(m/n + 1 + 1/n))) - 2*d*e**m*m*x*x**m*x**
n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/n + 1/n)/(c**2*(c*n**3*gamma(m/n + 1 + 1/n) + d*n**
3*x**n*gamma(m/n + 1 + 1/n))) + d*e**m*n*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/
n + 1/n)/(c**2*(c*n**3*gamma(m/n + 1 + 1/n) + d*n**3*x**n*gamma(m/n + 1 + 1/n))) - d*e**m*x*x**m*x**n*lerchphi
(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1/n)*gamma(m/n + 1/n)/(c**2*(c*n**3*gamma(m/n + 1 + 1/n) + d*n**3*x**n*gam
ma(m/n + 1 + 1/n)))) + A*b*(-e**m*m**2*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(
m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - e**m*m*n*x*x**m*x**n*ler
chphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**
3*x**n*gamma(m/n + 2 + 1/n))) + e**m*m*n*x*x**m*x**n*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*
n**3*x**n*gamma(m/n + 2 + 1/n))) - 2*e**m*m*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*g
amma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) + e**m*n**2*x*x**m*x*
*n*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - e**m*n*x*x**m*x
**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n)
+ d*n**3*x**n*gamma(m/n + 2 + 1/n))) + e**m*n*x*x**m*x**n*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n)
 + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - e**m*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*
gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - d*e**m*m**2*x*x**m
*x**(2*n)*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c**2*(c*n**3*gamma(m/n +
2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - d*e**m*m*n*x*x**m*x**(2*n)*lerchphi(d*x**n*exp_polar(I*pi)/c,
1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c**2*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n)))
 - 2*d*e**m*m*x*x**m*x**(2*n)*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c**2*
(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - d*e**m*n*x*x**m*x**(2*n)*lerchphi(d*x**n*e
xp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c**2*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamm
a(m/n + 2 + 1/n))) - d*e**m*x*x**m*x**(2*n)*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1
 + 1/n)/(c**2*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n)))) + B*a*(-e**m*m**2*x*x**m*x**n
*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d
*n**3*x**n*gamma(m/n + 2 + 1/n))) - e**m*m*n*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*
gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) + e**m*m*n*x*x**m*x*
*n*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - 2*e**m*m*x*x**m
*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n
) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) + e**m*n**2*x*x**m*x**n*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 +
 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - e**m*n*x*x**m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1
+ 1/n)*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) + e**m*n*x*x*
*m*x**n*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - e**m*x*x**
m*x**n*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, m/n + 1 + 1/n)*gamma(m/n + 1 + 1/n)/(c*(c*n**3*gamma(m/n + 2 + 1/
n) + d*n**3*x**n*gamma(m/n + 2 + 1/n))) - d*e**...

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^m*(a+b*x^n)*(A+B*x^n)/(c+d*x^n)^2,x, algorithm="giac")

[Out]

integrate((B*x^n + A)*(b*x^n + a)*(x*e)^m/(d*x^n + c)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (e\,x\right )}^m\,\left (A+B\,x^n\right )\,\left (a+b\,x^n\right )}{{\left (c+d\,x^n\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((e*x)^m*(A + B*x^n)*(a + b*x^n))/(c + d*x^n)^2,x)

[Out]

int(((e*x)^m*(A + B*x^n)*(a + b*x^n))/(c + d*x^n)^2, x)

________________________________________________________________________________________